900
How can I prevent a link to end to a specified bar
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-End-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Null,Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarCanEndLink] := OleVariant(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Null);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Null);
	end;
	EndUpdate();
end
899
How can I prevent a link to start from a specified bar
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-Start-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Null,Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarCanStartLink] := OleVariant(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Null);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Null);
	end;
	EndUpdate();
end
898
How can I prevent a specified bar to be linked
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Null,Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarCanBeLinked] := OleVariant(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Null);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Null);
	end;
	EndUpdate();
end
897
How can I display in the chart's header only days where the week starts

with G2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/31/2009';
		LevelCount := 2;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
		with Level[0] do
		begin
			Label := '<%mmmm%> <%yyyy%>';
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Unit := EXG2ANTTLib_TLB.exMonth;
		end;
		with Level[1] do
		begin
			Unit := EXG2ANTTLib_TLB.exDay;
			FormatLabel := ' (0:=weekday(dvalue)) = 1 ? ''<b>'' +value : '''' ';
		end;
		UnitWidth := 23;
	end;
end
896
Is there any automatically way to display and change the bar's duration in the columns section

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (IUnknown(Add('Duration')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
			Editor.EditType := EXG2ANTTLib_TLB.SpinType;
		end;
	end;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Null,Null);
	end;
	EndUpdate();
end
895
How can I programatically move or resize a bar using spin or slider controls in the columns

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (IUnknown(Add('Start')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
			Editor.EditType := EXG2ANTTLib_TLB.SpinType;
		end;
		with (IUnknown(Add('End')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
			Editor.EditType := EXG2ANTTLib_TLB.SpinType;
		end;
	end;
	with Chart do
	begin
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Null,Null);
	end;
	EndUpdate();
end
894
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/21/2005';
		ShowEmptyBars := 1;
	end;
	with Items do
	begin
		h := AddItem('Test');
		AddBar(h,'Task','6/22/2005','6/26/2005','',Null);
		AddBar(h,'Task','6/27/2005',ItemBar[h,'',EXG2ANTTLib_TLB.exBarEnd],Null,Null);
	end;
	EndUpdate();
end
893
How can change in the same time the starting and ending points of the bar
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/21/2005';
		ShowEmptyBars := 1;
	end;
	with Items do
	begin
		h := AddItem('Test');
		AddBar(h,'Task','6/22/2005','6/26/2005',Null,Null);
	end;
	with Items do
	begin
		h := FirstVisibleItem;
		AddBar(h,'Task','6/27/2005','6/29/2005',Null,Null);
	end;
	EndUpdate();
end
892
How can I control the exBarEffort property of the bar using slider controls

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	ShowFocusRect := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	(IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column).AllowDragging := False;
	with (IUnknown(Columns.Add('Histogram')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowDragging := False;
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		AllowSizing := False;
		Width := 18;
		LevelKey := OleVariant(1);
	end;
	Items.AllowCellValueToItemBar := True;
	with (IUnknown(Columns.Add('Effort')) as EXG2ANTTLib_TLB.Column) do
	begin
		LevelKey := OleVariant(1);
		AllowDragging := False;
		AllowSizing := False;
		Width := 64;
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(21);
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.SliderType;
			Option[EXG2ANTTLib_TLB.exSliderWidth] := OleVariant(-100);
			Option[EXG2ANTTLib_TLB.exSliderMax] := OleVariant(9);
			Option[EXG2ANTTLib_TLB.exSliderMin] := OleVariant(1);
		end;
	end;
	with Chart do
	begin
		LevelCount := 3;
		NonworkingDays := 0;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib_TLB.HistogramViewEnum($10000 Or Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramRecLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems));
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			HistogramCriticalColor := $ff;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Null,Null);
		CellEditorVisible[OleVariant(h),OleVariant(2)] := EXG2ANTTLib_TLB.exEditorHidden;
		CellValue[OleVariant(h),OleVariant(2)] := '';
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','6/21/2005','6/28/2005',Null,Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'Task 2');
		AddBar(h1,'Task','6/23/2005','7/1/2005','',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'Task 3');
		AddBar(h1,'Task','6/25/2005','6/27/2005','',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		ExpandItem[h] := True;
		CellState[OleVariant(h),OleVariant(1)] := 1;
		h := AddItem('Project 2');
		AddBar(h,'Summary','3/7/2005','7/12/2005',Null,Null);
		CellEditorVisible[OleVariant(h),OleVariant(2)] := EXG2ANTTLib_TLB.exEditorHidden;
		CellValue[OleVariant(h),OleVariant(2)] := '';
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','7/3/2005','7/8/2005',Null,Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'Task 2');
		AddBar(h1,'Task','7/5/2005','7/12/2005','',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'Task 3');
		AddBar(h1,'Task','7/7/2005','7/8/2005','',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		ExpandItem[h] := True;
		CellState[OleVariant(h),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
891
How can I determine if there is any Redo operation
with G2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
	var_CanRedo := Chart.CanRedo;
end
890
How can I determine if there is any Undo operation
with G2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
	var_CanUndo := Chart.CanUndo;
end
889
How can I turn on the Undo/Redo feature
with G2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
888
How can I disable resizing the histogram at runtime
with G2antt1 do
begin
	OnResizeControl := EXG2ANTTLib_TLB.exDisableHistogram;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
887
How can I display automatically the start and end dates of the bars in the columns section

with G2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('Tasks');
		with (IUnknown(Add('Start')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
		end;
		with (IUnknown(Add('End')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := True;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 196;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Null,Null);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006',Null,Null);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Null,Null);
	end;
	EndUpdate();
end
886
How can I enable Undo/Redo support
with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	with Columns do
	begin
		Add('Tasks');
		with (IUnknown(Add('Start')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
			LevelKey := OleVariant(1);
		end;
		with (IUnknown(Add('End')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
			LevelKey := OleVariant(1);
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := True;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 196;
		AllowUndoRedo := True;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Null,Null);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006',Null,Null);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Null,Null);
	end;
	EndUpdate();
end
885
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )

with G2antt1 do
begin
	BeginUpdate();
	Debug := True;
	MarkSearchColumn := False;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		(IUnknown(Add('Start')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.DateType;
		(IUnknown(Add('End')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.DateType;
		Add('Info');
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
	end;
	with Items do
	begin
		h1 := InsertItem(Null,Null,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/23/2006','A','Caption');
		ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		CellEditor[OleVariant(h1),OleVariant(3)].EditType := EXG2ANTTLib_TLB.EditType;
		CellValueToItemBar(OleVariant(h1),OleVariant(1),EXG2ANTTLib_TLB.exBarStart,'A');
		CellValueToItemBar(OleVariant(h1),OleVariant(2),EXG2ANTTLib_TLB.exBarEnd,'A');
		CellValueToItemBar(OleVariant(h1),OleVariant(3),EXG2ANTTLib_TLB.exBarCaption,'A');
		h2 := InsertItem(Null,Null,'Task 2');
		AddBar(h2,'Task','9/22/2006','9/24/2006','B',Null);
		with CellEditor[OleVariant(h2),OleVariant(3)] do
		begin
			EditType := EXG2ANTTLib_TLB.SliderType;
			Option[EXG2ANTTLib_TLB.exSliderWidth] := OleVariant(-100);
		end;
		CellValueToItemBar(OleVariant(h2),OleVariant(1),EXG2ANTTLib_TLB.exBarStart,'B');
		CellValueToItemBar(OleVariant(h2),OleVariant(2),EXG2ANTTLib_TLB.exBarEnd,'B');
		CellValueToItemBar(OleVariant(h2),OleVariant(3),EXG2ANTTLib_TLB.exBarTransparent,'B');
		h3 := InsertItem(Null,Null,'Task 3');
		AddBar(h3,'Task','9/23/2006','9/25/2006','C',Null);
		with CellEditor[OleVariant(h3),OleVariant(3)] do
		begin
			EditType := EXG2ANTTLib_TLB.DropDownType;
			AddItem(0,'Task',Null);
			AddItem(1,'Progress',Null);
			AddItem(2,'Project Summary',Null);
			AddItem(2,'Summary',Null);
		end;
		CellValueToItemBar(OleVariant(h3),OleVariant(1),EXG2ANTTLib_TLB.exBarStart,'C');
		CellValueToItemBar(OleVariant(h3),OleVariant(2),EXG2ANTTLib_TLB.exBarEnd,'C');
		CellValueToItemBar(OleVariant(h3),OleVariant(3),EXG2ANTTLib_TLB.exBarName,'C');
	end;
	EndUpdate();
end
884
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Indent := 11;
	HasLines := EXG2ANTTLib_TLB.exSolidLine;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		with (IUnknown(Add('Start')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(1);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
			LevelKey := OleVariant(1);
		end;
		with (IUnknown(Add('End')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(2);
			Editor.EditType := EXG2ANTTLib_TLB.DateType;
			LevelKey := OleVariant(1);
		end;
		with (IUnknown(Add('Transparency')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(19);
			with Editor do
			begin
				EditType := EXG2ANTTLib_TLB.SliderType;
				Option[EXG2ANTTLib_TLB.exSliderWidth] := OleVariant(-100);
			end;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
	end;
	with Items do
	begin
		h := AddItem('Project');
		AddBar(h,'Summary','9/21/2006','10/3/2006',Null,Null);
		CellEditorVisible[OleVariant(h),OleVariant(1)] := EXG2ANTTLib_TLB.exEditorHidden;
		CellEditorVisible[OleVariant(h),OleVariant(2)] := EXG2ANTTLib_TLB.exEditorHidden;
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/24/2006',Null,Null);
		h2 := InsertItem(h,Null,'Task 2');
		AddBar(h2,'Task','9/24/2006','9/28/2006',Null,Null);
		h3 := InsertItem(h,Null,'Task 3');
		AddBar(h3,'Task','9/28/2006','10/3/2006',Null,Null);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
883
How can I group two bars so I can specify the range or the limit of the interval between them

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	Columns.Add('Tasks');
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
	(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[OleVariant(h),OleVariant(1)] := '9/21/2006';
		CellValue[OleVariant(h),OleVariant(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[OleVariant(h),OleVariant(1)],CellValue[OleVariant(h),OleVariant(2)],'sum',Null);
		h1 := InsertItem(h,Null,'Task 1');
		CellValue[OleVariant(h1),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],'K1',Null);
		h2 := InsertItem(h,Null,'Task 2');
		CellValue[OleVariant(h2),OleVariant(1)] := CellValue[OleVariant(h1),OleVariant(2)];
		CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],'K2',Null);
		AddLink('L1',h1,'K1',h2,'K2');
		h3 := InsertItem(h,Null,'Task 3');
		CellValue[OleVariant(h3),OleVariant(1)] := CellValue[OleVariant(h2),OleVariant(2)];
		CellValue[OleVariant(h3),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(2)];
		AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],'K3',Null);
		AddLink('L2',h2,'K2',h3,'K3');
		GroupBars(h1,'K1',False,h2,'K2',True,OleVariant(31),'0;4');
		GroupBars(h2,'K2',False,h3,'K3',True,OleVariant(31),'0;2');
		DefineSummaryBars(h,'sum',h1,'K1');
		DefineSummaryBars(h,'sum',h2,'K2');
		DefineSummaryBars(h,'sum',h3,'K3');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
882
How can I group my bars so I can resize the interval between them but still keep the lengths of them

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	Columns.Add('Tasks');
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
	(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[OleVariant(h),OleVariant(1)] := '9/21/2006';
		CellValue[OleVariant(h),OleVariant(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[OleVariant(h),OleVariant(1)],CellValue[OleVariant(h),OleVariant(2)],Null,Null);
		h1 := InsertItem(h,Null,'Task 1');
		CellValue[OleVariant(h1),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],Null,Null);
		h2 := InsertItem(h,Null,'Task 2');
		CellValue[OleVariant(h2),OleVariant(1)] := CellValue[OleVariant(h1),OleVariant(2)];
		CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],Null,Null);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Null,'Task 3');
		CellValue[OleVariant(h3),OleVariant(1)] := CellValue[OleVariant(h2),OleVariant(2)];
		CellValue[OleVariant(h3),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(2)];
		AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],Null,Null);
		AddLink('L2',h2,'',h3,'');
		GroupBars(h1,'',False,h2,'',True,OleVariant(35),Null);
		GroupBars(h2,'',False,h3,'',True,OleVariant(35),Null);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
881
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	Columns.Add('Tasks');
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
	(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[OleVariant(h),OleVariant(1)] := '9/21/2006';
		CellValue[OleVariant(h),OleVariant(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[OleVariant(h),OleVariant(1)],CellValue[OleVariant(h),OleVariant(2)],Null,Null);
		h1 := InsertItem(h,Null,'Task 1');
		CellValue[OleVariant(h1),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(1)];
		CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],Null,Null);
		h2 := InsertItem(h,Null,'Task 2');
		CellValue[OleVariant(h2),OleVariant(1)] := CellValue[OleVariant(h1),OleVariant(2)];
		CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],Null,Null);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Null,'Task 3');
		CellValue[OleVariant(h3),OleVariant(1)] := CellValue[OleVariant(h2),OleVariant(2)];
		CellValue[OleVariant(h3),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(2)];
		AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],Null,Null);
		AddLink('L2',h2,'',h3,'');
		GroupBars(h1,'',False,h2,'',True,OleVariant(3),Null);
		GroupBars(h2,'',False,h3,'',True,OleVariant(3),Null);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
880
How can I split the time scale, so a section displays days, while other displays weeks, and the other months

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 24;
	Columns.Add('Default');
	with Chart do
	begin
		DrawDateTicker := True;
		DrawGridLines := EXG2ANTTLib_TLB.exVLines;
		NonworkingDays := 0;
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2007';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%yyyy%>';
			Unit := EXG2ANTTLib_TLB.exYear;
		end;
		with Level[1] do
		begin
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Label := '<%hy%>';
			Unit := EXG2ANTTLib_TLB.exHalfYear;
			ReplaceLabel['1'] := '<b>1/2</b>';
			ReplaceLabel['2'] := '<b>2/2</b>';
		end;
		with Level[2] do
		begin
			Label := '<%mmm%>';
			Unit := EXG2ANTTLib_TLB.exMonth;
		end;
		UnitWidth := 28;
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<b><%mmmm%></b> (weeks) ';
			InsideLabel := '<font ;6>W: <b><%ww%></b>';
			InsideUnit := EXG2ANTTLib_TLB.exWeek;
		end;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			with Add('1/1/2007') do
			begin
				AllowCustomFormat := True;
				with CustomFormat do
				begin
					OwnerLabel := '<b><%mmmm%></b> (weeks) ';
					InsideLabel := '<font ;6>W: <b><%ww%></b>';
					InsideUnit := EXG2ANTTLib_TLB.exWeek;
					BackColorChart := $f0e7bb;
				end;
			end;
			with Add('3/1/2007') do
			begin
				AllowCustomFormat := True;
				Width := 356;
				with CustomFormat do
				begin
					OwnerLabel := '<b><%mmmm%></b> (days) ';
					InsideLabel := '<font ;5><%d%></font>';
					InsideUnit := EXG2ANTTLib_TLB.exDay;
					BackColorChart := $f0c891;
				end;
			end;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task 1 ');
		AddBar(h,'Task','1/12/2007','3/9/2007',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/25/2007','3/12/2007',Null,Null);
		h := AddItem('Task 3');
		AddBar(h,'Task','2/1/2007','2/8/2007','B1',Null);
		AddBar(h,'Task','2/8/2007','2/15/2007','B2',Null);
		AddBar(h,'Task','2/15/2007','2/22/2007','B3',Null);
		AddBar(h,'Task','2/22/2007','2/28/2007','B4',Null);
	end;
	EndUpdate();
end
879
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Add('A') do
	begin
		Color := $ff;
		Shape := EXG2ANTTLib_TLB.exShapeSolidUp;
		Pattern := EXG2ANTTLib_TLB.exPatternSolid;
	end;
	with Chart.Bars.Add('B') do
	begin
		Color := $80;
		Shape := EXG2ANTTLib_TLB.exShapeSolidDown;
		Pattern := EXG2ANTTLib_TLB.exPatternSolid;
	end;
	Chart.Bars.Add('A%B').Shortcut := 'AB';
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'AB','1/2/2001','1/6/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(1);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCanResizePercent] := OleVariant(False);
	end;
	EndUpdate();
end
878
Does your control support RightToLeft property for RTL languages or right to left
with G2antt1 do
begin
	BeginUpdate();
	ScrollBars := EXG2ANTTLib_TLB.exDisableBoth;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	RightToLeft := True;
	EndUpdate();
end
877
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
with G2antt1 do
begin
	BeginUpdate();
	ScrollBars := EXG2ANTTLib_TLB.exDisableBoth;
	with Columns do
	begin
		Add('C1');
		Add('C2');
		Add('C3');
		Add('C4');
		Add('C5');
		Add('C6');
		Add('C7');
		Add('C8');
	end;
	RightToLeft := True;
	EndUpdate();
end
876
Can I display the cell's check box after the text
with G2antt1 do
begin
	with (IUnknown(Columns.Add('Column')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'caption,check';
	end;
	with Items do
	begin
		CellHasCheckBox[OleVariant(AddItem('Caption 1')),OleVariant(0)] := True;
		CellHasCheckBox[OleVariant(AddItem('Caption 2')),OleVariant(0)] := True;
	end;
end
875
Can I change the order of the parts in the cell, as checkbox after the text, and so on
with G2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	(IUnknown(Columns.Add('Column')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture';
	with Items do
	begin
		h := AddItem('Text');
		CellImage[OleVariant(h),OleVariant(0)] := 1;
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
	end;
end
874
Can I have an image displayed after the text. Can I get that effect without using HTML content
with G2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	(IUnknown(Columns.Add('Column')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'caption,icon,check,icons,picture';
	with Items do
	begin
		h := AddItem('Text');
		CellImage[OleVariant(h),OleVariant(0)] := 1;
	end;
end
873
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor

with G2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/17/2008';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exSecond;
		Level[1].FormatLabel := '(0:=sec(dvalue)) mod 2 ? 0=: : ''<bgcolor=00FF00>'' + 0=:';
	end;
end
872
Is there any option to print the columns section on each page

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Col 1');
	Columns.Add('Col 2');
	MarkSearchColumn := False;
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.LevelCount := 2;
	with Items do
	begin
		h1 := AddItem('Col 1');
		CellValue[OleVariant(h1),OleVariant(1)] := 'Col 2';
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Null);
		h2 := AddItem('Col 1');
		CellValue[OleVariant(h2),OleVariant(1)] := 'Col 2';
		AddBar(h2,'Task','2/5/2001','2/7/2001','K2',Null);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(0);
	end;
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'ColumnsOnEveryPage=-2';
		PrintExt := (IUnknown(G2antt1.DefaultInterface) as EXG2ANTTLib_TLB.G2antt);
		Preview();
	end;
end
871
How can I add a different non-working area for different items

with G2antt1 do
begin
	Columns.Add('Non-Work');
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
		FirstVisibleDate := '1/24/2008';
		PaneWidth[False] := 52;
		LevelCount := 2;
	end;
	with Items do
	begin
		h := AddItem('January');
		ItemNonworkingUnits[h,OleVariant(False)] := 'month(value) = 1';
		h := AddItem('February, Saturday, Sunday');
		ItemNonworkingUnits[h,OleVariant(False)] := 'month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)';
		h := AddItem('Sunday');
		ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) = 0';
	end;
end
870
How can I define different non-working units for different items

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 78;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		FirstVisibleDate := '6/20/2005';
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
		LevelCount := 3;
		Level[1].DrawGridLines := False;
		AllowInsideZoom := True;
		DrawDateTicker := True;
		DateTickerLabel := '<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>';
		MarkSelectDateColor := $7ffff8ee;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<%mmm%> <%d%>';
			BackColor := $fff8ee;
			BackColorChart := BackColor;
			InsideCount := 4;
			InsideLabel := '<b><%hh%></b>';
		end;
		InsideZooms.Add('6/22/2005');
		DrawGridLines := EXG2ANTTLib_TLB.exVLines;
		Bars.Item['Split'].Color := $ff;
		with Bars.Add('Task:Split') do
		begin
			Color := $ff;
			Pattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			Shortcut := 'TaskS';
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Null,Null);
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'TaskS','6/21/2005','6/28/2005',Null,Null);
		ItemNonworkingUnits[h1,OleVariant(False)] := 'weekday(value)=1 or weekday(value)=2';
		ItemNonworkingUnits[h1,OleVariant(True)] := 'weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )';
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'Task 2');
		AddBar(h1,'TaskS','6/22/2005 4:00:00 AM','7/1/2005','E',Null);
		ItemNonworkingUnits[h1,OleVariant(False)] := 'weekday(value)=0';
		ItemNonworkingUnits[h1,OleVariant(True)] := 'weekday(value)=0 or hour(value)<4 or hour(value)>19';
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'Task 3');
		AddBar(h1,'TaskS','6/22/2005 12:00:00 PM','6/27/2005','E',Null);
		ItemNonworkingUnits[h1,OleVariant(False)] := 'weekday(value)=1 or weekday(value)=2';
		ItemNonworkingUnits[h1,OleVariant(True)] := 'weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )';
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		h := AddItem('Project 2');
		AddBar(h,'Summary','6/26/2005','7/6/2005',Null,Null);
		h1 := InsertItem(h,Null,'TaskS 1');
		AddBar(h1,'TaskS','6/26/2005','7/2/2005',Null,Null);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'TaskS 2');
		AddBar(h1,'TaskS','6/28/2005','7/6/2005','E',Null);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'TaskS 3');
		AddBar(h1,'TaskS','6/30/2005','7/2/2005','E',Null);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
869
I want to define/highlight for specified dates as being non-working. Is this possible

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Items');
	with Chart do
	begin
		NonworkingDaysColor := $ff;
		PaneWidth[False] := 48;
		c := NonworkingDaysColor;
		p := NonworkingDaysPattern;
		FirstVisibleDate := '1/1/2001';
		with Bars.Add('NW') do
		begin
			Color := c;
			Pattern := p;
			Height := -1;
			Shape := EXG2ANTTLib_TLB.exShapeSolidFrameless;
		end;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		AddBar(h,'NW','1/2/2001','1/3/2001','0',Null);
		ItemBar[h,'0',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Null);
		h := AddItem('Item 2');
		AddBar(h,'NW','1/2/2001','1/4/2001','0',Null);
		ItemBar[h,'0',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		AddBar(h,'Task','1/2/2001','1/5/2001','K2',Null);
	end;
	EndUpdate();
end
868
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	ShowFocusRect := False;
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('C')) as EXG2ANTTLib_TLB.Column) do
	begin
		HeaderAlignment := EXG2ANTTLib_TLB.CenterAlignment;
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		AllowSizing := False;
		Width := 18;
	end;
	with Chart do
	begin
		PaneWidth[False] := 96;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		FirstVisibleDate := '6/20/2005';
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
		LevelCount := 3;
		Level[1].DrawGridLines := False;
		AllowInsideZoom := True;
		DrawDateTicker := True;
		DateTickerLabel := '<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>';
		MarkSelectDateColor := $7ffff8ee;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<%mmm%> <%d%>';
			BackColor := $fff8ee;
			BackColorChart := BackColor;
			InsideCount := 4;
			InsideLabel := '<b><%hh%></b>';
		end;
		InsideZooms.Add('6/22/2005');
		DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Null,Null);
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','6/21/2005','6/28/2005',Null,Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'Task 2');
		AddBar(h1,'Task','6/23/2005','7/1/2005','E',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'Task 3');
		AddBar(h1,'Task','6/25/2005','6/27/2005','E',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		CellState[OleVariant(h),OleVariant(1)] := 1;
		h := AddItem('Project 2');
		AddBar(h,'Summary','6/26/2005','7/6/2005',Null,Null);
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','6/26/2005','7/2/2005',Null,Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Null,'Task 2');
		AddBar(h1,'Task','6/28/2005','7/6/2005','E',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(5);
		h1 := InsertItem(h,Null,'Task 3');
		AddBar(h1,'Task','6/30/2005','7/2/2005','E',Null);
		CellMerge[OleVariant(h1),OleVariant(0)] := OleVariant(1);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		CellState[OleVariant(h),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
867
How can I define my own/custom labels and subdivisions

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		ToolTip := '';
		PaneWidth[False] := 0;
		ScrollRange[EXG2ANTTLib_TLB.exStartDate] := OleVariant(0);
		ScrollRange[EXG2ANTTLib_TLB.exEndDate] := OleVariant(110);
		FirstVisibleDate := OleVariant(0);
		ShowNonworkingDates := False;
		MarkTodayColor := BackColor;
		LevelCount := 3;
		with Level[0] do
		begin
			ToolTip := '';
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Unit := EXG2ANTTLib_TLB.exDay;
			Count := 16;
			FormatLabel := '''Group <b>''+int(1 +dvalue/16)';
		end;
		with Level[1] do
		begin
			ToolTip := '';
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Unit := EXG2ANTTLib_TLB.exDay;
			Count := 4;
			FormatLabel := ' (abs(dvalue)/4) mod 4';
			ReplaceLabel['0'] := 'Sub-Group <b>1</b>';
			ReplaceLabel['1'] := 'Sub-Group <b>2</b>';
			ReplaceLabel['2'] := 'Sub-Group <b>3</b>';
			ReplaceLabel['3'] := 'Sub-Group <b>4</b>';
		end;
		with Level[2] do
		begin
			ToolTip := '';
			Unit := EXG2ANTTLib_TLB.exDay;
			Count := 1;
			FormatLabel := '(abs(dvalue) mod 4)';
			ReplaceLabel['0'] := 'A';
			ReplaceLabel['1'] := 'B';
			ReplaceLabel['2'] := 'C';
			ReplaceLabel['3'] := 'D';
		end;
	end;
	EndUpdate();
end
866
I want to mark or highlight the last Friday of the month. Is there any option to do that

with G2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/17/2008';
		LevelCount := 2;
		Level[1].FormatLabel := '(weekday(dvalue)=5 ? month(dvalue+7)!=month(dvalue) ? ''<b><bgcolor=000000><fgcolor=FFFFFF>'' ) + value';
	end;
end
865
I use the SelectDate method but the dates are not being highligted. What can I do
with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		SelectLevel := 1;
		SelectDate['1/2/2008'] := True;
	end;
	EndUpdate();
end
864
Can I use ebn files to display the selected dates

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'c:\exontrol\images\normal.ebn');
		Add(1,'CP:2 0 -4 0 4');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
		SelectDate['1/4/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Null,Null);
		AddBar(AddItem('Item 4'),'Task','1/5/2008','1/9/2008',Null,Null);
	end;
	EndUpdate();
end
863
Can I use ebn files to display the selected dates

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Null,Null);
	end;
	EndUpdate();
end
862
How can I change the color for selected dates to be solid

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $7fff0000;
		SelectLevel := 1;
		SelectDate['1/15/2008'] := True;
		SelectDate['1/16/2008'] := True;
	end;
	EndUpdate();
end
861
How can I disable selecting dates when I click the chart's header
with G2antt1 do
begin
	Chart.AllowSelectDate := EXG2ANTTLib_TLB.exNoSelectDate;
end
860
Is there any option to specify which dates can be magnified or resized
with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		ShowNonworkingDates := True;
		CondInsideZoom := 'not(weekday(value) = 0 or weekday(value) = 6)';
	end;
	EndUpdate();
end
859
How can I change the width for a specified date time unit

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		with InsideZooms do
		begin
			with Add('1/4/2008') do
			begin
				Width := 32;
				AllowInsideFormat := False;
			end;
		end;
	end;
	EndUpdate();
end
858
How can I disable the control's splitter so the user can't resize the list area
with G2antt1 do
begin
	OnResizeControl := Integer(EXG2ANTTLib_TLB.exDisableSplitter) Or Integer(EXG2ANTTLib_TLB.exResizeChart);
	Chart.PaneWidth[False] := 60;
end
857
How can I disable the control's splitter so the user can't resize the chart area
with G2antt1 do
begin
	OnResizeControl := EXG2ANTTLib_TLB.exDisableSplitter;
	Chart.PaneWidth[True] := 60;
end
856
How can I change the label for a specified unit

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.OwnerLabel := '<b><%d%></b> <%d2%>';
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 32;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
855
How can I bold the inside units

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.InsideLabel := '<b><%hh%></b>';
		InsideZooms.Add('1/4/2008');
	end;
	EndUpdate();
end
854
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		ShowNonworkingDates := False;
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Label := '<%mmmm%>';
			Unit := EXG2ANTTLib_TLB.exMonth;
		end;
		with Level[1] do
		begin
			Label := '<%ww%>';
			Unit := EXG2ANTTLib_TLB.exWeek;
		end;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<font ;7><%mmm%> Week: <%ww%>';
			InsideLabel := '<font ;7><b><%d1%></b>';
			InsideUnit := EXG2ANTTLib_TLB.exDay;
		end;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			Add('2/3/2008');
		end;
	end;
	EndUpdate();
end
853
How can I zoom or magnify the selected date to display the hours, from 8 to 8

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			InsideLabel := 'H: <b><%hh%></b>';
			InsideUnit := EXG2ANTTLib_TLB.exHour;
			InsideCount := 8;
		end;
		with InsideZooms do
		begin
			Add('1/4/2008');
		end;
	end;
	EndUpdate();
end
852
How can I zoom or magnify the selected date to display the hours

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with InsideZooms do
		begin
			Add('1/4/2008');
		end;
	end;
	EndUpdate();
end
851
How can I change the foreground color for a time unit

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.ForeColor := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
850
How can I change the background color for a time unit, in the chart area

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColorChart := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
849
How can I change the background color for a time unit, using EBN files

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColor := $1000000;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
848
How can I change the background color for a time unit

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColor := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
847
How can I display the column using currency format and enlarge the font for certain values
with G2antt1 do
begin
	with (IUnknown(Columns.Add('Currency')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
	end;
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('9.94');
		AddItem('11.94');
		AddItem('1000');
	end;
end
846
How can I highlight only parts of the cells
with G2antt1 do
begin
	with (IUnknown(Columns.Add('')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := 'value replace ''hil'' with ''<fgcolor=FF0000><b>hil</b></fgcolor>''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'Child 3');
		ExpandItem[h] := True;
	end;
end
845
How can I get the number of occurrences of a specified string in the cell
with G2antt1 do
begin
	Columns.Add('');
	with (IUnknown(Columns.Add('occurrences')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := 'lower(%0) count ''o''';
		FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1 oooof the root');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'Child 3');
		ExpandItem[h] := True;
	end;
end
844
How can I display dates in my format
with G2antt1 do
begin
	with (IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
	end;
	with Items do
	begin
		AddItem('1/21/2001');
		AddItem('2/22/2002');
		AddItem('3/13/2003');
		AddItem('4/24/2004');
	end;
end
843
How can I display dates in short format
with G2antt1 do
begin
	(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'shortdate(value)';
	with Items do
	begin
		AddItem('1/1/2001');
		AddItem('2/2/2002');
		AddItem('3/3/2003');
		AddItem('4/4/2004');
	end;
end
842
How can I display dates in long format
with G2antt1 do
begin
	(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'longdate(value)';
	with Items do
	begin
		AddItem('1/1/2001');
		AddItem('2/2/2002');
		AddItem('3/3/2003');
		AddItem('4/4/2004');
	end;
end
841
How can I display only the right part of the cell
with G2antt1 do
begin
	Columns.Add('');
	with (IUnknown(Columns.Add('Right')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%0 right 2';
		FormatColumn := '''"'' + value + ''"''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'SChild 3');
		ExpandItem[h] := True;
	end;
end
840
How can I display only the left part of the cell
with G2antt1 do
begin
	Columns.Add('');
	(IUnknown(Columns.Add('Left')) as EXG2ANTTLib_TLB.Column).ComputedField := '%0 left 2';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'SChild 3');
		ExpandItem[h] := True;
	end;
end
839
How can I display true or false instead 0 and -1
with G2antt1 do
begin
	(IUnknown(Columns.Add('Boolean')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
	with Items do
	begin
		AddItem(OleVariant(True));
		AddItem(OleVariant(False));
		AddItem(OleVariant(True));
		AddItem(OleVariant(0));
		AddItem(OleVariant(1));
	end;
end
838
Is there any option to print the columns section on each page

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.LevelCount := 2;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','2/5/2001','2/7/2001','K2',Null);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(0);
	end;
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'ColumnsOnEveryPage=1';
		PrintExt := (IUnknown(G2antt1.DefaultInterface) as EXG2ANTTLib_TLB.G2antt);
		Preview();
	end;
end
837
How do I print the control's content

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Null);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(0);
	end;
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		PrintExt := (IUnknown(G2antt1.DefaultInterface) as EXG2ANTTLib_TLB.G2antt);
		Preview();
	end;
end
836
How can I display icons or images instead numbers
with G2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (IUnknown(Columns.Add('Icons')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
	end;
	with Items do
	begin
		AddItem(OleVariant(1));
		AddItem(OleVariant(2));
		AddItem(OleVariant(3));
	end;
end
835
How can I display the column using currency
with G2antt1 do
begin
	(IUnknown(Columns.Add('Currency')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'currency(dbl(value))';
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('0');
		AddItem(OleVariant(5));
		AddItem('10000.99');
	end;
end
834
How can I display the currency only for not empty cells
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Currency')) as EXG2ANTTLib_TLB.Column).ComputedField := 'len(%0) ? currency(dbl(%0)) : ''''';
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('0');
		ItemBackColor[AddItem(Null)] := $8080ff;
		AddItem('10000.99');
	end;
end
833
Is there a function to display the number of days between two date including the number of hours
with G2antt1 do
begin
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Width := 32;
	Columns.Add('End');
	(IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column).ComputedField := '((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*' + 
	'24))) != 0 ? =:1 + '' hour(s) '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[OleVariant(h),OleVariant(1)] := '1/14/2001';
		h := AddItem('2/22/2002 12:00:00 PM');
		CellValue[OleVariant(h),OleVariant(1)] := '3/14/2002 1:00:00 PM';
		h := AddItem('3/13/2003');
		CellValue[OleVariant(h),OleVariant(1)] := '4/11/2003 11:00:00 AM';
	end;
end
832
Is there a function to display the number of days between two date including the number of hours
with G2antt1 do
begin
	Columns.Add('Start');
	Columns.Add('End');
	(IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column).ComputedField := '"D " + int(date(%1)-date(%0)) + " H " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[OleVariant(h),OleVariant(1)] := '1/14/2001 11:00:00 PM';
		h := AddItem('2/22/2002 12:00:00 PM');
		CellValue[OleVariant(h),OleVariant(1)] := '3/14/2002 1:00:00 PM';
		h := AddItem('3/13/2003');
		CellValue[OleVariant(h),OleVariant(1)] := '4/11/2003 11:00:00 AM';
	end;
end
831
How can I display the number of days between two dates
with G2antt1 do
begin
	Columns.Add('Start');
	Columns.Add('End');
	(IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column).ComputedField := '(date(%1)-date(%0)) + '' days''';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[OleVariant(h),OleVariant(1)] := '1/14/2001';
		h := AddItem('2/22/2002');
		CellValue[OleVariant(h),OleVariant(1)] := '3/14/2002';
		h := AddItem('3/13/2003');
		CellValue[OleVariant(h),OleVariant(1)] := '4/11/2003';
	end;
end
830
How can I get second part of the date
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Second')) as EXG2ANTTLib_TLB.Column).ComputedField := 'sec(date(%0))';
	with Items do
	begin
		AddItem('1/11/2001 10:10:00 AM');
		AddItem('2/22/2002 11:01:22 AM');
		AddItem('3/13/2003 12:23:01 PM');
		AddItem('4/14/2004 1:11:59 PM');
	end;
end
829
How can I get minute part of the date
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Minute')) as EXG2ANTTLib_TLB.Column).ComputedField := 'min(date(%0))';
	with Items do
	begin
		AddItem('1/11/2001 10:10:00 AM');
		AddItem('2/22/2002 11:01:00 AM');
		AddItem('3/13/2003 12:23:00 PM');
		AddItem('4/14/2004 1:11:00 PM');
	end;
end
828
How can I check the hour part only so I know it was afternoon
with G2antt1 do
begin
	ConditionalFormats.Add('hour(%0)>=12',Null).Bold := True;
	Columns.Add('Date');
	(IUnknown(Columns.Add('Hour')) as EXG2ANTTLib_TLB.Column).ComputedField := 'hour(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
827
What about a function to get the day in the week, or days since Sunday
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('WeekDay')) as EXG2ANTTLib_TLB.Column).ComputedField := 'weekday(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
826
Is there any function to get the day of the year or number of days since January 1st
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Day since January 1st')) as EXG2ANTTLib_TLB.Column).ComputedField := 'yearday(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
825
How can I display only the day of the date
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Day')) as EXG2ANTTLib_TLB.Column).ComputedField := 'day(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
824
How can I display only the month of the date
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Month')) as EXG2ANTTLib_TLB.Column).ComputedField := 'month(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
823
How can I get only the year part from a date expression
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Year')) as EXG2ANTTLib_TLB.Column).ComputedField := 'year(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
822
Can I convert the expression to date
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).ComputedField := 'date(dbl(%0))';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('30000.99');
		AddItem('3561.23');
		AddItem('1232.34');
	end;
end
821
Can I convert the expression to a number, double or float
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Number + 2')) as EXG2ANTTLib_TLB.Column).ComputedField := 'dbl(%0)+2';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
820
How can I display dates in long format
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('LongFormat')) as EXG2ANTTLib_TLB.Column).ComputedField := 'longdate(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
819
How can I display dates in short format
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('ShortFormat')) as EXG2ANTTLib_TLB.Column).ComputedField := 'shortdate(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
818
How can I display the time only of a date expression
with G2antt1 do
begin
	Columns.Add('Date');
	(IUnknown(Columns.Add('Time')) as EXG2ANTTLib_TLB.Column).ComputedField := '''time is:'' + time(date(%0))';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
817
Is there any function to display currencies, or money formatted as in the control panel
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Currency')) as EXG2ANTTLib_TLB.Column).ComputedField := 'currency(dbl(%0))';
	with Items do
	begin
		AddItem(OleVariant(1.23));
		AddItem(OleVariant(2.34));
		AddItem(OleVariant(10000.99));
	end;
end
816
How can I convert the expression to a string so I can look into the date string expression for month's name
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Str')) as EXG2ANTTLib_TLB.Column).ComputedField := 'str(%0) + '' AA''';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
815
Can I display the absolute value or positive part of the number
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Abs')) as EXG2ANTTLib_TLB.Column).ComputedField := 'abs(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
814
Is there any function to get largest number with no fraction part that is not greater than the value
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Floor')) as EXG2ANTTLib_TLB.Column).ComputedField := 'floor(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
813
Is there any function to round the values base on the .5 value
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Round')) as EXG2ANTTLib_TLB.Column).ComputedField := 'round(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
812
How can I get or display the integer part of the cell
with G2antt1 do
begin
	Columns.Add('Number');
	(IUnknown(Columns.Add('Int')) as EXG2ANTTLib_TLB.Column).ComputedField := 'int(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
811
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
with G2antt1 do
begin
	(IUnknown(Columns.Add('')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'proper(%0)';
	with Items do
	begin
		h := AddItem('root');
		InsertItem(h,Null,'child child');
		InsertItem(h,Null,'child child');
		InsertItem(h,Null,'child child');
		ExpandItem[h] := True;
	end;
end
810
Is there any option to display cells in uppercase
with G2antt1 do
begin
	(IUnknown(Columns.Add('')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'upper(%0)';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'Chld 3');
		ExpandItem[h] := True;
	end;
end
809
Is there any option to display cells in lowercase
with G2antt1 do
begin
	(IUnknown(Columns.Add('')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'lower(%0)';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'Chld 3');
		ExpandItem[h] := True;
	end;
end
808
How can I mark the cells that has a specified type, ie strings only
with G2antt1 do
begin
	ConditionalFormats.Add('type(%0) = 8',Null).ForeColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,OleVariant(2));
		InsertItem(h,Null,'Chld 3');
		ExpandItem[h] := True;
	end;
end
807
How can I bold the items that contains data or those who displays empty strings
with G2antt1 do
begin
	ConditionalFormats.Add('not len(%1)=0',Null).Bold := True;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		hC := InsertItem(h,Null,'Child 2');
		CellValue[OleVariant(hC),OleVariant(1)] := '1';
		InsertItem(h,Null,'Child 3');
		ExpandItem[h] := True;
	end;
end
806
Can I change the background color for items or cells that contains a specified string
with G2antt1 do
begin
	ConditionalFormats.Add('%0 contains ''hi''',Null).BackColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'Chld 3');
		ExpandItem[h] := True;
	end;
end
805
Is there any option to change the fore color for cells or items that ends with a specified string
with G2antt1 do
begin
	ConditionalFormats.Add('%0 endwith ''22''',Null).ForeColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 1.22');
		InsertItem(h,Null,'Child 2.22');
		ExpandItem[h] := True;
	end;
end
804
How can I highlight the cells or items that starts with a specified string
with G2antt1 do
begin
	ConditionalFormats.Add('%0 startwith ''C''',Null).Underline := True;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		InsertItem(h,Null,'SChild 3');
		ExpandItem[h] := True;
	end;
end
803
How can I change the background color or the visual appearance using ebn for a particular column
with G2antt1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exHeaderBackColor] := OleVariant(16777216);
		(IUnknown(Add('Column 3')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exHeaderBackColor] := OleVariant(16777471);
		Add('Column 4');
	end;
end
802
How can I change the foreground color for a particular column
with G2antt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exHeaderForeColor] := OleVariant(8439039);
		Add('Column 3');
	end;
end
801
How can I change the background color for a particular column
with G2antt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exHeaderBackColor] := OleVariant(8439039);
		Add('Column 3');
	end;
end